let g:cmd_plantuml='java -jar ' .expand('<sfile>:p:h') .'/libs/plantuml.1.2019.12.jar -tsvg -charset UTF-8 '
let g:cmd_plantuml_json=json_encode('{"cmd":"' .g:cmd_plantuml .'"}')
function plantuml#save(source)
    let l:target=input('save dir :',fnamemodify(a:source,":p:h"),'file')
    if l:target == '' 

    else
        if !isdirectory(l:target)
            call mkdir(l:target)
        endif
        let l:cmd=g:cmd_plantuml   .' -o ' .l:target .' ' .a:source 
        call python#execute_os_cmd(l:cmd)
    endif
endfunction

function plantuml#preview()
    call preview#preview(expand("%p"),g:cmd_plantuml_json)
endfunction

